<template>
  <div class="color">
    <div ref="echarts_div"></div>
  </div>
</template>

<script>
import axios from '@/utlis/axios'
export default {
  data() {
    return {
      echarts: '',
      allDate: '',
    }
  },
  methods: {
    Inite() {
      const echarts1 = this.$echarts.init(this.$refs.echarts_div)
      this.echarts = echarts1
      const option = {
        tooltip: {},
      }
      echarts1.setOption(option)
    },
    //数据处理
    async getDate(store) {
      const { data: res } = await axios.get('/grade')
      this.allDate = res.data
      this.allDate.forEach(item => {
        let categeory=null
        for(let k in item){
          console.log(k);
        }
      });
    },
  },
  created() {
    this.$store.dispatch('getDate')
    this.getDate()
  },
  computed: {},
  mounted() {
    this.Inite()
  },
}
</script>

<style lang="less" scoped>
.color {
  width: 100%;
  height: 90vh;
}
</style>